﻿using Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 纺织贸易管理系统;
using 纺织贸易管理系统.设置窗体;

namespace 后整理管理系统.入库管理
{
    public partial class 入库信息 : Sunny.UI.UIForm
    {
        public string Danhao { get; set; }
        public 入库信息()
        {
            InitializeComponent();
            CreateGrid.Create("来货入库单", gridView1);
            if(gridView1.Columns["rq"]==null)
            {
                gridView1.Columns.Add(new DevExpress.XtraGrid.Columns.GridColumn() { Caption = "日期", FieldName = "rq" });
            }
            if (gridView1.Columns["danhao"] == null)
            {
                gridView1.Columns.Add(new DevExpress.XtraGrid.Columns.GridColumn() { Caption = "入库单号", FieldName = "danhao",Visible=true  });
            }
            gridView1.Columns["rq"].Visible = true;
            gridView1.Columns["rq"].Caption = "日期";
        }

        private void 出库信息_Load(object sender, EventArgs e)
        {
            var mingxis = Connect.dbcontext.Queryable<danjumingxitable>().Where(x=>x.danhao==Danhao).ToList ();
            gridControl1.DataSource = mingxis;
        }
    }
}
